package houxb.cn.excelanalysis;

import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
public class WorkloadBook {
    // sheet页
    private Integer sheet;
    // 数据行号
    private Integer row;
    /**
     * 表头
     */
    @Getter
    private List<WorkloadCol> cols;

    public WorkloadBook(String... labelName) {
        if (labelName == null || labelName.length == 0) {
            return;
        }
        List<WorkloadCol> cols = new ArrayList<>();
        for (String name : labelName) {
            cols.add(new WorkloadCol(name));
        }
        this.cols = cols;
    }
}
